package com.znjc.device.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.znjc.common.annotation.Excel;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 【请填写功能名称】对象 device_category_rule_ref
 *
 * @author zengpc
 * @date 2023-12-04
 */
@Data
public class DeviceRuleRef {
    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 设备id
     */
    @Excel(name = "设备id")
    private Long deviceId;

    /**
     * 测点id
     */
    @Excel(name = "测点id")
    private Long pointId;

    /**
     * 测点名称
     */
    @Excel(name = "测点名称")
    @TableField(exist = false)
    private String pointName;

    /**
     * 数据解析规则id
     */
    @Excel(name = "数据解析规则id")
    private Long resRuleId;
    /**
     * 排序
     */
    @Excel(name = "排序")
    private Integer sort;
    /**
     * 解析名称
     */
    @Excel(name = "解析名称")
    @TableField(exist = false)
    private String resRuleName;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("deviceId", getDeviceId())
                .append("pointId", getPointId())
                .append("pointName", getPointName())
                .append("resRuleId", getResRuleId())
                .append("resRuleName", getResRuleName())
                .toString();
    }
}
